package cn.middle.edge.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.middle.common.base.mapper.BaseMapper;
import com.middle.common.base.service.impl.BaseServiceImpl;

import cn.middle.edge.entity.EdgePark;
import cn.middle.edge.mapper.EdgeParkMapper;
import cn.middle.edge.service.EdgeParkService;

@Service
public class EdgeParkServiceImpl extends BaseServiceImpl<EdgePark> implements EdgeParkService {
	
	@Autowired
	private EdgeParkMapper mapper;

	@Override
	public BaseMapper<EdgePark> getDao() {
		return mapper;
	}

	@Override
	public EdgePark theOne() {
		List<EdgePark> parks = mapper.selectAll();
		if(parks != null && !parks.isEmpty()) {
			return parks.get(0);
		}
		return null;
	}

}
